<template>
	<view :style="{'background':ktheme == 'black' ? 'black':'white'}" style="min-height: 100vh">
		<!-- <view class="top_logo">
			<image src="/static/download/logo.png">
		</view> -->
		<hx-navbar :back="true" :fixed="false" :color="knavTitleColor" barPlaceholder="hidden"
			transparent="auto"></hx-navbar>
		<!-- 紫色 -->
		<view v-if="ktheme == 'purple'" class="container" style="text-align: center;">
			<view class="doctor" style="font-size: 30px;" v-if="!weChatShow" :style="{'color':knormalColor}">
				<image class="doctor_logo" v-if="ktheme == 'purple'" src="/static/login/logo.png" mode="scaleToFill"
					style="border-radius: 20rpx;"></image>
				<image class="doctor_logo" v-if="ktheme == 'black'" src="/static/login/logo-black.png"
					mode="scaleToFill" style="border-radius: 20rpx;"></image>
				<p>金世界</p>
				<view class="button_container" :class="ktheme =='black' ? 'button_black':'button_white'"
					@click="zhongfujiayi">
					<view class="button_container_left">
						<image src="/static/download/android2.png">
					</view>
					<view class="button_container_right">
						<view>Android</view>
						<view>立即下载</view>
					</view>
				</view>
				<view class="button_container" :class="ktheme =='black' ? 'button_black':'button_white'"
					@click="iosManual()">
					<!-- ios -->
					<view class="button_container_left">
						<image src="/static/download/IOS.png">
					</view>
					<view class="button_container_right">
						<view>IOS</view>
						<view>立即下载</view>
					</view>
				</view>
				<!-- <view class="button_container" :class="ktheme =='black' ? 'button_black':'button_white'" @click="back">
						<view class="button_container_right">
							<view>返回</view>
						</view>
					</view> -->
			</view>
		</view>
		<!-- 黑色 -->
		<view class="container" v-if="ktheme == 'black'">
			<view class="downLoad_modal"  v-if="!weChatShow" >
				<image src="/static/download/downLoad.png">
			</view>
			<view class="doctor" v-if="!weChatShow" :style="{'color':knormalColor}">
<view class="" style="display: flex; align-items: center;">
	<image class="doctor_black_logo" src="/static/download/logo (2).png" mode="scaleToFill"
						style="border-radius: 20rpx;"></image>
					<view class="" style="margin-left: 10rpx;">
						<view style="font-weight: 500;font-size: 36rpx;color: #F5D8A7;" >金世界App</view>
					    <view style="font-weight: 500;font-size: 20rpx;color: #F6D9A9;opacity: 0.4;">数字科技商品综合服务平台</view>
					</view>
	
</view>
				
				<view class="button_cont_black">
					<view class="button_container" :class="ktheme =='black' ? 'button_black':'button_white'"
						@click="zhongfujiayi">
						<view class="button_container_left">
							<image src="/static/download/android2.png">
						</view>
						<view class="button_container_right">
							<view>Android</view>
							<view>立即下载</view>
						</view>
					</view>
					<view class="button_container" :class="ktheme =='black' ? 'button_black':'button_white'"
						@click="iosManual()">
						<!-- ios -->
						<view class="button_container_left">
							<image src="/static/download/IOS.png">
						</view>
						<view class="button_container_right">
							<view>IOS</view>
							<view>立即下载</view>
						</view>
					</view>
					 
				</view>
			</view>
		</view>



		<view class="modal" v-if="weChatShow">
			<image src="/static/download/modal.png">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				weChatShow: false
			}
		},
		methods: {
			iosManual() {
				uni.navigateTo({
					url: '/pages/index/ios_manual'
				})
			},
			zhongfujiayi() {
				let url = 'https://shucang.zhongfujiayi.com/zwsl-app.apk';
				// #ifdef H5
				const ua = window.navigator.userAgent.toLowerCase();
				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
					this.weChatShow = true
				} else {
					this.weChatShow = false
					window.open(url)
				}
				// #endif
				// #ifdef APP-PLUS
				plus.runtime.openURL(url)
				// #endif
			},
			ios() {
				const ua = window.navigator.userAgent.toLowerCase();
				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
					this.weChatShow = true
				} else {
					this.weChatShow = false
					let url = 'https://shucang.zhongfujiayi.com//zwsl.mobileconfig';
					// #ifdef H5
					window.open(url)
					// #endif
					// #ifdef APP-PLUS
					plus.runtime.openURL(url)
					// #endif
				}
			},
			back() {
				uni.switchTab({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss">
	.button_container_right {
		color: white;
	}

	.modal {
		position: fixed;
		height: 100vh;
		width: 100vw;
		top: 0;
		left: 0;
		background: rgb(99, 99, 99);

		image {
			width: 100%;
			height: 100%;
			object-fit: contain;
		}
	}

	.top_logo {
		padding: 20rpx 0 0 20px;

		image {
			width: 218px;
			height: 50px;
		}

	}

	p {
		margin: 5px 0 20px 0;
	}

	.container {
		max-width: 1280px;
		padding: 20px;
		display: flex;
		flex-direction: column;

		// justify-content: center;
		.doctor {
		
			&_logo {
				margin-top: 100rpx;
				width: 100px;
				height: 100px;
			}
		}

		.shop {
			font-size: 30px;

			&_logo {
				width: 100px;
				height: 100px;
				border-radius: 20px;
			}
		}
	}

	.button_black {
		border: 4rpx #FFD38C solid;

	}
	.button_cont_black{
		margin-top:62vh;
	}

	.button_white {
		border: 2rpx #6958D5 solid;
		background: #cca2fc;


	}

	.button_container {
		width: 70%;
		margin: 0 auto 20px auto;
		justify-content: center;
		display: flex;
		// height: 45px;
		align-items: center;
		border-radius: 30px;
		font-size: 15px;
		// color: #ffffff;
		padding: 4px 50px;
		// background: #28caad;

		&_left {
			image {
				height: 40px;
				width: 40px;
				margin-right: 5px;
			}
		}

		.button_container_left_more {
			image {
				height: 30px;
				width: 30px;
				margin-right: 8px;
			}
		}
	}

	.downLoad_modal {
		position: fixed;
		height: 70vh;
		width: 100vw;
		top: 0;
		left: 0;
		background: rgb(99, 99, 99);
z-index: -1;
		image {
			width: 100%;
			height: 100%;
			object-fit: contain;
		}
	}
	.doctor_black_logo{
		width: 86rpx;
		height: 87rpx;
	}
</style>